﻿Imports System.ServiceModel

<ServiceContract()>
Public Interface I<OwnerU>_<TableU>Service

    <OperationContract()>
    Function SelectAll() As DataSet

    <OperationContract()>
    Function Select_Record(ByVal cls<OwnerU>_<TableU>Para As <OwnerU>_<TableU>Class) As <OwnerU>_<TableU>Class

    <OperationContract()>
    Function Add(ByVal cls<OwnerU>_<TableU> As <OwnerU>_<TableU>Class) As Boolean

    <OperationContract()>
    Function Update(ByVal cls<OwnerU>_<TableU>Old As <OwnerU>_<TableU>Class, ByVal cls<OwnerU>_<TableU>New As <OwnerU>_<TableU>Class) As Boolean

    <OperationContract()>
    Function Delete(ByVal cls<OwnerU>_<TableU> As <OwnerU>_<TableU>Class) As Boolean

End Interface

<DataContract()>
Public Class <OwnerU>_<TableU>Class

    <If Loop>
       <IsNotNull>
    Private m_<FieldU> As <VBType>
       <IsNull>
       <And>
       <IsNotNullable>
    Private m_<FieldU> As <VBType>
       <IsNull>
       <And>
       <IsNullable>
    Private m_<FieldU> As Nullable(Of <VBType>)
    </If Loop>

    <If Loop>
       <IsNotNull>
    <DataMember()>
    Public Property <FieldU>() As <VBType>
        Get
            Return m_<FieldU>
        End Get
        Set(ByVal value As <VBType>)
            m_<FieldU> = value 
        End Set
    End Property

       <IsNull>
       <And>
       <IsNotNullable>
    <DataMember()>
    Public Property <FieldU>() As <VBType>
        Get
            Return m_<FieldU>
        End Get
        Set(ByVal value As <VBType>)
            m_<FieldU> = value 
        End Set
    End Property

       <IsNull>
       <And>
       <IsNullable>
    <DataMember()>
    Public Property <FieldU>() As Nullable(Of <VBType>)
        Get
            Return m_<FieldU>
        End Get
        Set(ByVal value As Nullable(Of <VBType>))
            m_<FieldU> = value 
        End Set
    End Property

    </If Loop>
End Class
